home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr52
/
expand53.zip
/
XPDEMO.ZIP
/
XPEGAVGA.PRG
< prev
next >
Wrap
Text File
|
1992-08-07
|
2KB
|
69 lines
* ------------------------------------------------------------------------
* Module......: XPEGAVGA.PRG
* Title.......: EGA/VGA part of the Expand Library Demonstration Program
* Author......: Pepijn Smits.
* Date........: July/August 1992
* Copyright...: (c)1992 by Softwarebureau Pepijn Smits
* Notes.......: Clipper 5.01 Demo of the Expand Library
* Some general EGA/VGA functions
* See XPDEMO.RMK For Compile and Link instructions.
* ------------------------------------------------------------------------
#include "..\EXPAND.CH"
#include "INKEY.CH"
Function EGAtest()
Local lEga := XPegaThere()
if !lEga
XPalert('~EGA/VGA~ required',;
'This option requires that you have a ~EGA/VGA~ card installed!')
end
Return (lEGA)
Function FontStd()
if EGAtest()
if XPvgaThere()
XPvgaStdFont()
else
XPegaStdFont()
end
end
Return (NIL)
Function FontTest()
Field FONTNAME, FONTINFO, FONTDATA
if EGAtest()
if FontUsed()
XPmsg(' Load ~Font~ │ Select Font. ~Enter~-Loads, ~Esc~-Aborts')
XPedit(' ~EGA/VGA~ Fonts',;
' Font: Info:',{||' '+FONTNAME+' '+FONTINFO+' '},;
{|i|DoFont(i)})
USE
else
XPalert("Font File not Found!",;
"The File ~VGAFONTS.DBF~ or ~EGAFONTS.DBF~ was not found!;"+;
"You must place this file (according if you have an EGA or a VGA;"+;
"in the directory where XPDEMO.EXE is located in order to use;"+;
"The font load part of this Demo program.")
end
end
Return (NIL)
Static Function FontUsed()
Local lRet := .f.
Local cFontFile := if(XPvgaThere(),"VGAFONTS.DBF","EGAFONTS.DBF")
if file(MyDrive()+cFontFile)
USE (MyDrive()+cFontFile) NEW READONLY
lRet := Used()
end
Return (lRet)
Static Function DoFont(i)
Field FONTDATA
if Lastkey()=K_ENTER
XPloadFont(0,FONTDATA,if(XPvgaThere(),16,14))
i := K_SPACE
else
i := Lastkey()
end
Return (i)